import { getAction, deleteAction, putAction, postAction, httpAction, downFile } from '@/api/manage'
import {appendParams} from "ol/uri";

/**
 * 专干/社工管理
 */

const serviceName = '/sjsk-administrator-service'
//获取流程配置列表
const getProcessList = (params)=>getAction(`${serviceName}/processConfig/getProcessList`,params)
//保存督办设置
const saverSetup = params => postAction(`${serviceName}/sjsk/superviseSetUp/saverSetup`,params)
//获取督办设置
const getSetId = () => getAction(`${serviceName}/sjsk/superviseSetUp/getSetId`)
//获取督办统计
const getSuperviseCount = (params) => getAction(`${serviceName}/sjsk/supervise/getSuperviseCount` , params)
//获取督办列表
const SuperviseList = params => getAction(`${serviceName}/sjsk/supervise/list`,params)
//督办归档
const putFile = params => postAction(`${serviceName}/sjsk/supervise/putFile/${params}`)

//专干社工人员列表
const administrotorsList = params => getAction(`${serviceName}/sjsk/administrotors/list`,params)
//专干社区查看
const seeAdministrators = params => postAction(`${serviceName}/sjsk/administrotors/seeAdministrators/${params}`)
// 人员入职
const administrotorsAdd = params => postAction(`${serviceName}/sjsk/administrotors/add`,params)
//根据行政区划编码获取所有专干
const getDivisionAdmin = params => getAction(`${serviceName}/sjsk/administrotors/getDivisionAdmin`,params)
//根据人员id获取人员所在部门区域
const getDepart = params => postAction(`${serviceName}/sjsk/administrotors/getDepart/${params}`)
//人员离职
const quit = params => postAction(`${serviceName}/sjsk/administrotors/quit`,params)

//获取专干社工培训列表
const trainList = params => getAction(`${serviceName}/sjsk/administrotors/trainList`,params)
//查看培训
const selectTrain = params => getAction(`${serviceName}/sjsk/administrotors/selectTrain/${params}`)
//培训签到
const trainSign = params => postAction(`${serviceName}/sjsk/administrotors/trainSign`,params)
//获取该培训的所有参与人员
const selectJoinAll = params => getAction(`${serviceName}/sjsk/administrotors/selectJoinAll/${params}`)
//预定培训
const scheduledTrain = params => postAction(`${serviceName}/sjsk/administrotors/scheduledTrain`,params)
//获取线上培训数据
const getOnLine = appendParams => getAction(`${serviceName}/sjsk/administrotors/getOnLine`,params)
/**
 * 消息
 */

const backlogListCount = params =>postAction(`${serviceName}/sjsk/supervise/backlogListCount`,params)
//编辑or反馈待办事项
const updateBacklog = params => postAction(`${serviceName}/sjsk/supervise/updateBacklog`,params)

export {
  saverSetup,getSetId,getSuperviseCount,
  SuperviseList,
  putFile,
  backlogListCount,
  administrotorsList,
  administrotorsAdd,
  getDivisionAdmin,
  updateBacklog,
  seeAdministrators,
  getDepart,

  trainList,
  selectTrain,
  trainSign,
  selectJoinAll,
  scheduledTrain,
  getOnLine,
  quit
}



